package com.glsc.ngateway.common.xir.repo;

import java.util.List;

import com.glsc.ngateway.common.xir.domain.TtrdSetInstructionCash;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface TtrdSetInstructionCashRepository extends JpaRepository<TtrdSetInstructionCash, String>, JpaSpecificationExecutor<TtrdSetInstructionCash> {

    @Query("select t from TtrdSetInstructionCash t where t.begDate < :date and t.endDate > :date and t.state = :state")
    List<TtrdSetInstructionCash> findByDateAndState(@Param("date") String date,@Param("state") String state);
}